:root {
  --primary-color: #5d5d81; /* 深紫色 */
  --primary-hover-color: #7b7b9d;
  --secondary-color: #f0f2f5;
  --secondary-hover-color: #e0e2e5;
  --text-color: #333;
  --text-secondary-color: #666;
  --border-color: #e5e5e5;
  --background-color: #f8f9fa;
  --card-background-color: #fff;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --border-radius: 12px;
  /* 无衬线字体（适合移动端正文，清晰易读） */
  --font-family-sans: 'Roboto',
  'Helvetica Neue',
  'Helvetica',
  'PingFang SC',
  'Hiragino Sans GB',
  'Microsoft YaHei',
  'Arial',
  sans-serif;
  /* 衬线字体（适合标题或正文强调，移动端可读性较好） */
  --font-family-serif: 'Noto Serif SC',
  'PingFang SC',
  'Heiti SC',
  'Microsoft YaHei',
  'Times New Roman',
  serif;
}

*, ::before, ::after {
  box-sizing: border-box;
}

body {
  background-color: var(--background-color);
  line-height: 1.6;
  margin: 0;
  color: var(--text-color);
  font-family: var(--font-family-sans);
}

.wrap-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 1024px;
  margin: 0 auto;
  padding: 24px;
}

.header {
  margin-bottom: 32px;
  text-align: center;
  padding-bottom: 12px;
}

.app-title {
  margin: 0;
  color: var(--primary-color);
  font: 700 3rem var(--font-family-serif);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  letter-spacing: 2px;
}

.version-tag {
  font-size: 0.6em;
  /*color: #5d5d81;*/
  /*background-color: #f0f2f5;*/
  color: #529b2e;
  background-color: #f0f9eb;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 6px;
}

.main-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 24px;
}

.container {
  padding: 24px;
  background-color: var(--card-background-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:last-child {
  margin-bottom: 0;
}

.section-title {
  margin-top: 0;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-color);
  padding-left: 12px;
  color: var(--primary-color);
  font: 600 1.5rem var(--font-family-sans);
}

.download-container {
  height: auto;
  flex-shrink: 0;
}

.result-container {
  flex: 1;
}

.search-container {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}

.search-container input {
  flex: 1;
}

input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(93, 93, 129, 0.1);
}

input[disabled] {
  background-color: var(--secondary-color);
  border-color: #e4e7ed;
  color: #c0c4cc;
  cursor: not-allowed;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  outline: none;
  background-color: transparent;
  cursor: pointer;
  font: 500 1rem var(--font-family-sans);
  text-align: center;
  user-select: none;
  transition: all 0.3s ease;
}

.btn-primary {
  color: #fff;
  background-color: var(--primary-color);
}

.btn-primary:focus, .btn-primary:hover {
  background-color: var(--primary-hover-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-download {
  padding: 5px 0 !important;
  width: 50px;
}

.btn-secondary {
  border: 1px solid var(--border-color);
  color: var(--primary-color);
  background-color: var(--secondary-color);
}

.btn-secondary:focus, .btn-secondary:hover {
  background-color: var(--secondary-hover-color);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.body-container {
  flex: 1;
  overflow: auto;
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead {
  background-color: var(--secondary-color);
}

.data-table th, .data-table td {
  padding: 10px 10px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  position: sticky;
  top: 0;
  background-color: var(--secondary-color);
  color: var(--text-secondary-color);
  font-weight: 600;
  font-size: 0.95rem;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background-color: #f9fafb;
}

.loading-container {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
}

.loading-container .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 3rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.loading-icon {
  width: 60px;
  height: 60px;
  animation: rotation 1.5s cubic-bezier(0.8, 0, 0.2, 1) infinite;
}

.loading-icon circle {
  stroke: #fff; /* 将圆环颜色设置为白色，与 loading-container 的背景色相匹配 */
}

.loading-container .text {
  margin-top: 20px;
  color: #fff;
  font-size: 1.25rem;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .app-title {
    font-size: 2.5rem;
  }

  .wrap-container {
    padding: 16px;
  }

  .search-container {
    flex-direction: column;
    gap: 8px;
  }

  .search-container input, .btn {
    width: 100%;
  }

  .data-table, .data-table thead, .data-table tbody, .data-table th, .data-table td, .data-table tr {
    display: block;
  }

  .data-table thead {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .data-table tr {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }

  .data-table td {
    position: relative;
    padding-left: 50%;
    border: none;
    border-bottom: 1px solid #eee;
    text-align: right;
  }

  .data-table td:before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    width: 45%;
    padding-right: 10px;
    color: var(--text-secondary-color);
    font-weight: bold;
    text-align: left;
    white-space: nowrap;
  }

  .data-table tr:last-child td:last-child {
    border-bottom: none;
  }
}